<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>业务查询</title>
    <link rel="stylesheet" href="../assets/plugin/calendar/css/calendar.css"/>
    <link rel="stylesheet" href="../assets/plugin/layer/layer.js"/>
    <link rel="stylesheet" href="../assets/css/common.css"/>
    <link rel="stylesheet" href="../assets/css/search.css"/>
</head>
<body>
<div class="calendar-section">
</div>
<div class="form-section">
    <form action="">
        <input type="text" placeholder="柜号" name="containerNo"/>
        <input type="text" placeholder="报关单号" name="sno"/>
        <button type="button" class="search-btn common-btn">查询</button>
    </form>
</div>
<script type="text/javascript" src="../assets/js/jquery.js"></script>
<script type="text/javascript" src="../assets/js/config.js"></script>
<script type="text/javascript" src="../assets/js/common.js"></script>
<script type="text/javascript" src="../assets/plugin/layer/layer.js"></script>
<script type="text/javascript" src="../assets/plugin/calendar/js/calendar.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        var arr = getParams().split("=");
        $(".calendar-section").calendar({
                                            url: addressUrl + "monthDeclaList",
                                            type: 'get',
                                            dataType: 'json',
                                            data: {"openid": arr[1]}
                                        });
        /*$(".calendar-section").calendar({
         data: {"openid": "qingchen"}
         });*/
        $(".search-btn").on("click", function () {
            if ($("form").serialize() == 'containerNo=&sno=') {
                layer.alert("请输入要查询的柜号或报关单号");
                return;
            }
            $.ajax({
                       /*url: '../assets/js/testData/queryResult.js',*/
                       url: addressUrl + "exactly_bizInfo",
                       data: $("form").serialize() + "&" + getParams(),
                       type: 'get',
                       cache: false,
                       dataType: 'json',
                       success: function (data) {
                           if (data.error == "0" && data.content) {
                               localStorage.setItem("searchData", JSON.stringify(data));
                               window.location.href = "result.html";
                           } else {
                               window.location.href = "noResult.html";
                           }
                       },
                       error: function (a, b, c) {
                           window.location.href = "noFind.html";
                       }
                   });
        });
    });

</script>
</body>
</html>